
<template>
    <div class="mt-4">
        <div class="flex items-center justify-between px-4">
            <div class="text-base font-bold">相关推荐</div>
        </div>
        <div class="px-4 mt-4 text-center text-gray-700 ">
            <Goods :data="goods" />
        </div>
    </div>
</template>
    
<script setup lang='ts'>
import { tmpData } from '~/views/home/tmp';
const goods = ref<any>([])
const loadMore = (done: any) => {
    console.log('load more',goods.value.length)
    setTimeout(() => {
        goods.value.push(
            ...tmpData.slice(0, 5)
        )
        done();
    }, 1000);
}
defineExpose({
    loadMore
})
</script>
    
<style lang="scss" scoped></style>